//
//  MyScrollView.m
//  UI-05 Homework UIScrollView
//
//  Created by 冀永金 on 16/7/20.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "MyScrollView.h"

@implementation MyScrollView
-(instancetype)initWithFrame:(CGRect)frame images:(UIImage *)images {
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        self.imageView.image = images;
        [self addSubview:self.imageView];
        self.delegate = self;
        self.minimumZoomScale = .5;
        self.maximumZoomScale = 2.0;
        
    }
    return self;
}

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
    return _imageView;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
